/**
 * 
 */
package jUnit_tests;

import static org.junit.Assert.*;
import model.CreditCard;

import org.junit.Test;

/**
 * Junit test for the creditCard class.
 * 
 * @author Abdiel Cabrera
 * @param <CreditCard>
 *
 */
public class Junit_test_for_creditCard {
	
	// valid creditCard
	private CreditCard creditCard1 = new CreditCard("1231234236756845", 14 , 4, "123");
	
	// invalid creditCard with invalid creditCard number
    private CreditCard creditCard2 = new CreditCard("1231dfsg36756845", 14 , 4, "123");
		
    // invalid creditCard with invalid signature number
 	private CreditCard creditCard3 = new CreditCard("1231234236756845", 14 , 4, "125543");
 	
    // invalid creditCard with PAST expiration year
 	private CreditCard creditCard4 = new CreditCard("1231234236756845", 12 , 4, "123");
 	
    // invalid creditCard with bad expiration month
 	private CreditCard creditCard5 = new CreditCard("1231234236756845", 14 , 19, "123");
 	
	@Test
	public void test() {
		assertTrue("Testing CreditCard1", creditCard1.isValid());
		assertFalse("Testing CreditCard2", creditCard2.isValid());
		assertFalse("Testing CreditCard3", creditCard3.isValid());
		assertFalse("Testing CreditCard4", creditCard4.isValid());
		assertFalse("Testing CreditCard5", creditCard5.isValid());
	}
}
